package org.zjx.account.enums;

import lombok.Getter;

@Getter
public enum Race {
    FEI_YAN_NV("飞燕女", 1, 0),
    YING_NV_XIA("英女侠", 1, 0),
    WU_MAN_ER("巫蛮儿", 1, 0),
    YAN_LAO_SHI("偃老师", 0, 0),
    XIAO_YAO_SHENG("逍遥生", 0, 0),
    JIAN_XIA_KE("剑侠客", 0, 0),
    WU_TIAN_JI("舞天姬", 1, 1),
    XUAN_CAI_E("玄彩娥", 1, 1),
    TAO_TIAN_TIAN("桃天天", 1, 1),
    YU_LING_SHEN("羽灵神", 0, 1),
    SHEN_TIAN_BING("神天兵", 0, 1),
    LONG_TAI_ZI("龙太子", 0, 1),
    HU_MEI_REN("狐美人", 1, 2),
    GU_JING_LING("骨精灵", 1, 2),
    GUI_XIAO_XIAO("鬼潇潇", 1, 2),
    SHA_PO_LANG("杀破狼", 0, 2),
    JU_MO_WANG("巨魔王", 0, 2),
    HU_TOU_GUAI("虎头怪", 0, 2),
    YING_JING_LING("影精灵", 1, 2);

    private final String name;
    private final int sex; // 性别 0男 1女
    private final int category; // 种族 0人 1仙 2魔

    Race(String name, int sex, int category) {
        this.name = name;
        this.sex = sex;
        this.category = category;
    }

    public static Race fromName(String name) {
        for (Race race : values()) {
            if (race.name.equals(name)) {
                return race;
            }
        }
        throw new IllegalArgumentException("Unknown Race: " + name);
    }
}